package com.demo.bean.controller.bottom;

import com.demo.bean.service.bottom.BottomService;
import com.demo.common.entity.ColumnManagement;
import com.demo.common.entity.CompanyDetails;
import com.demo.common.entity.MediaCoverage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 底部小标
 * 作者：张兴然
 * 分配任务：张改
 * 插入数据：贾冠博
 */
@RestController
public class BottomController {

    @Autowired
    private BottomService bottomService;

    /**
     * 查询公司详细信息
     * @return
     */
    @GetMapping("/companyDetails")
    public CompanyDetails selectCompany(){
        return bottomService.selectCompany();
    }

    /**
     * 查询公司媒体信息
     * @return
     */
    @GetMapping("/media")
    public List<MediaCoverage> selectMedia(){
        return bottomService.selectAllMediaTitle();
    }

    /**
     * 查询底部小标
     * @return
     */
    @GetMapping("/bottom")
    public List<ColumnManagement> selectColumn(){
        return bottomService.selectAllColumn();
    }

}
